package com.lian.pet.domain.vo;

import com.lian.pet.common.basic.utils.DateUtil;
import com.lian.pet.domain.entity.Pets;
import com.lian.pet.domain.entity.Vaccines;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import org.springframework.util.ObjectUtils;

@AllArgsConstructor
@Data
@Builder
@ApiModel("查询疫苗信息")
public class VaccinesVO {
    private Integer id;
    @ApiModelProperty(value = "疫苗名称")
    private String name;
    @ApiModelProperty(value = "疫苗描述")
    private String content;

    public static VaccinesVO fromVaccines(Vaccines entity) {
        return VaccinesVO.builder()
                .id(entity.getId())
                .name(entity.getName())
                .content(entity.getContent())
                .build();
    }
}
